feat: split childProcess integration into childProcess and worker integrations - #22885
feat: split childProcess integration into childProcess and worker integrations#22885atharv-sys32 wants to merge 1 commit into
Conversation
…egrations The childProcess integration handled both child process and worker thread events under one integration. This splits it into two: - childProcessIntegration: handles child process events only - workerIntegration: handles worker thread events only (new) The old childProcessIntegration's captureWorkerErrors option is deprecated. Users should use workerIntegration() instead. Fixes getsentry#18698 Signed-off-by: Atharv Pandey <atharvpandey245@gmail.com>
6a56912 to
26c387c
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 26c387c. Configure here.
| processSessionIntegration, | ||
| prismaIntegration, | ||
| childProcessIntegration, | ||
| workerIntegration, |
There was a problem hiding this comment.
Missing Astro workerIntegration export
Medium Severity
workerIntegration is exported from @sentry/node, @sentry/aws-serverless, and @sentry/google-cloud-serverless, but @sentry/astro still only re-exports childProcessIntegration. Astro users cannot access the new API, and the consistent-exports check will fail for @sentry/astro.
Reviewed by Cursor Bugbot for commit 26c387c. Configure here.
| .on('error', error => { | ||
| if (options.captureWorkerErrors !== false) { | ||
| captureException(error, { | ||
| mechanism: { type: 'auto.worker_thread', handled: false, data: { threadId: threadId !== undefined ? String(threadId) : undefined } }, |
There was a problem hiding this comment.
Stale worker mechanism in tests
Medium Severity
workerIntegration now reports mechanism type auto.worker_thread, and child-process/test.ts was updated, but OnUncaughtException worker-thread tests still expect auto.child_process.worker_thread. Those suites use default integrations, so they will fail against the new mechanism. This was flagged because the review rules require feat PR tests to cover the newly added behavior.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 26c387c. Configure here.
| export * as logger from './logs/exports'; | ||
|
|
||
| export { childProcessIntegration } from './integrations/childProcess'; | ||
| export { workerIntegration } from './integrations/workerIntegration'; |
There was a problem hiding this comment.
Bun export check missing ignore
Medium Severity
workerIntegration is a new @sentry/node export, but Bun already ignores childProcessIntegration as unsupported and does not ignore workerIntegration. The consistent-exports e2e check will treat the new export as missing from @sentry/bun and fail.
Reviewed by Cursor Bugbot for commit 26c387c. Configure here.


The childProcess integration handled both child process and worker thread events under one integration. This splits it into two separate integrations:
The old childProcessIntegration's captureWorkerErrors option is deprecated. Users should use workerIntegration() instead.
Fixes #18698